{extend name="base" /} {block name="head"}
<meta name="description" content="">
<meta name="keywords" content="">
<title>模拟炒股首页</title>
{/block} {block name="css"} {css file="/static/css/index/index.css"} {/block} {block name="header"}{include file="public/header" /}{/block} 
{block name="main"}
<div class="am-g am-container" id="index">
    <div class="am-slider am-slider-default tr-slider-ad" id="tr-slider-ad">
      <ul class="am-slides">
        <li v-for="item in ad_slider"><a :href="item.href" :title="item.title"><img :src="item.img" :alt="item.title" /></a></li>
      </ul>
    </div>   
    <div class="tr-proclamation"> 
        <div class="am-fl tr-pro-t">
            <span class="am-icon-volume-up"></span>
            <span class="tr-pro-t-c">最新播报</span>
        </div>
        <div class="am-fl">
            <dl id="ticker-1">
                <dd v-for="item in proclamation"><a :href="item.href" :title="item.title" target="_blank">{{ item.title }}</a></dd>
            </dl>
        </div>
    </div>
    <div v-if="recommend.length > 0" class="am-panel am-panel-default tr-talent">
        <div class="am-panel-hd">
            <h2 class="am-panel-title">
                高手推荐
            </h2>
        </div>
        <div class="am-slider am-slider-default am-margin-bottom-0 am-slider-carousel tr-slider" id="tr-slider">
            <ul class="am-slides">
                <li v-for="item in recommend">
                    <div class="am-g tr-talent-info am-padding">
                        <div class="am-u-sm-5 am-padding-right">
                            <a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name">
                                <img :src="item.avatar" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" alt="portrait" class="am-circle">
                            </a>
                        </div>
                        <div class="am-u-sm-7">
                            <p class="tr-talent-name">{{ item.user_name }}</p>
                            <p class="tr-talent-ranking">排名：{{ item.ranking }}</p>
                            <p class="tr-talent-rate">周盈利率：<span :class="item.week_rate_class">{{ item.week_rate }}</span></p>
                            <p class="tr-talent-btn"><a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name" class="am-btn am-btn-danger am-btn-sm am-radius" width="50%">他的模拟炒股</a></p>
                        </div>
                    </div>
                    <div class="tr-talent-reason am-padding-vertical-sm am-padding-horizontal">
                        推荐理由：{{ item.reason }}
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="am-tabs tr-tabs" data-am-tabs="{noSwipe: 1}" id="tr-tabs">
        <ul class="am-tabs-nav am-nav am-nav-tabs">
            <li class="am-active"><a href="javascript:;" class="item" more-url="{:url('index/index/rankingList', ['order'=>'talent_dynamic'])}">牛人动态</a></li>
            <li><a href="javascript:;" class="item" more-url="{:url('index/index/rankingList', ['order'=>'days_rank'])}">日盈利率</a></li>
            <li><a href="javascript:;" class="item" more-url="{:url('index/index/rankingList', ['order'=>'week_rank'])}">周赛排名</a></li>
            <li><a href="javascript:;" class="item" more-url="{:url('index/index/rankingList', ['order'=>'month_rank'])}">月赛排名</a></li>
            <li><a href="javascript:;" class="item" more-url="{:url('index/index/rankingList', ['order'=>'total_rate'])}">总盈利率</a></li>
        </ul>
        <div class="tr-more">
            <a id="tr-tabs-more" href="{:url('index/index/rankingList', ['order'=>'talent_dynamic'])}" alt="查看百强排名">查看百强排名&gt;&gt;</a>
        </div>
        <div class="am-tabs-bd">
            <div class="am-tab-panel am-active">
                <table class="am-table am-table-centered">
                    <thead>
                        <tr>
                            <th width="6%">序号</th>
                            <th width="18%">用户名</th>
                            <th width="16%">股票名称</th>
                            <th>状态</th>
                            <th>价格(&yen;)</th>
                            <th width="18%">时间</th>
                            <th>今日动态</th>
                        </tr>
                    </thead>
                    <tbody>
                        <template v-if="talent_dynamic.length > 0">
                            <tr v-for="(item, index) in talent_dynamic">
                                <td>{{ index+1 }}</td>
                                <td class="am-text-left">
                                    <div class="tr-username">
                                        <a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a>
                                    </div>
                                </td>
                                <td><a :href="item.stock_url" target="_blank" rel="nofollow"><span class="tr-shares-name">{{ item.stock }}</span></a></td>
                                <td><span :class="item.state_class">{{ item.state }}</span></td>
                                <td><span class="tr-color-price">{{ item.price }}</span></td>
                                <td><span>{{ item.time }}</span></td>
                                <td><a :href="'{:url("index/index/personal")}?uid=' + item.uid" class="am-btn am-btn-primary am-btn-xs am-radius">追踪可看</a></td>
                            </tr>
                        </template>
                        <template v-else>
                            <tr>
                                <td colspan="7"><span>暂无数据</span></td>
                            </tr>
                        </template>
                    </tbody>
                </table>
            </div>
            <div class="am-tab-panel">
                <table class="am-table am-table-centered">
                    <thead>
                        <tr>
                            <th>排名</th>
                            <th width="18%">用户名</th>
                            <th><span class="tr-color-order">日盈利率</span></th>
                            <th>周盈利率</span></th>
                            <th>月盈利率</th>
                            <th>总盈利率</th>
                            <th>选股成功率</th>
                            <th>周均收益率</th>
                            <th>平均持股天数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <template v-if="days_rate.length > 0">
                        <tr v-for="item in days_rate">
                            <td><span :class="'tr-rank'+ item.ranking_icon">{{ item.ranking }}</span></td>
                            <td class="am-text-left">
                                <div class="tr-username">
                                    <a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a>
                                </div>
                            </td>
                            <td><span :class="'tr-color-order '+item.days_rate_class">{{ item.days_rate }}</span></td>
                            <td><span :class="item.week_rate_class">{{ item.week_rate }}</span></td>
                            <td><span :class="item.month_rate_class">{{ item.month_rate }}</span></td>
                            <td><span :class="item.total_rate_class">{{ item.total_rate }}</span></td>
                            <td><span>{{ item.success_rate }}</span></td>
                            <td><span :class="item.week_avg_profit_rate_class">{{ item.week_avg_profit_rate }}</span></td>
                            <td><span>{{ item.avg_position_day }}</span></td>
                        </tr>
                        </template>
                        <template v-else>
                        <tr><td colspan="9"><span>暂无数据</span></td></tr>
                        </template>
                    </tbody>
                </table>
            </div>
            <div class="am-tab-panel">
                <table class="am-table am-table-centered">
                    <thead>
                        <tr>
                            <th>排名</th>
                            <th width="18%">用户名</th>
                            <th>日盈利率</th>
                            <th><span class="tr-color-order">周盈利率</span></th>
                            <th>月盈利率</th>
                            <th>总盈利率</th>
                            <th>选股成功率</th>
                            <th>周均收益率</th>
                            <th>平均持股天数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <template v-if="week_rate.length > 0">
                        <tr v-for="item in week_rate">
                            <td><span :class="'tr-rank'+ item.ranking_icon">{{ item.ranking }}</span></td>
                            <td class="am-text-left">
                                <div class="tr-username">
                                    <a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a>
                                </div>
                            </td>
                            <td><span :class="item.days_rate_class">{{ item.days_rate }}</span></td>
                            <td><span :class="'tr-color-order '+item.week_rate_class">{{ item.week_rate }}</span></td>
                            <td><span :class="item.month_rate_class">{{ item.month_rate }}</span></td>
                            <td><span :class="item.total_rate_class">{{ item.total_rate }}</span></td>
                            <td><span>{{ item.success_rate }}</span></td>
                            <td><span :class="item.week_avg_profit_rate_class">{{ item.week_avg_profit_rate }}</span></td>
                            <td><span>{{ item.avg_position_day }}</span></td>
                        </tr>
                        </template>
                        <template v-else>
                        <tr><td colspan="9"><span>暂无数据</span></td></tr>
                        </template>
                    </tbody>
                </table>
            </div>
            <div class="am-tab-panel">
                <table class="am-table am-table-centered">
                    <thead>
                        <tr>
                            <th>排名</th>
                            <th width="18%">用户名</th>
                            <th>日盈利率</th>
                            <th>周盈利率</th>
                            <th><span class="tr-color-order">月盈利率</span></th>
                            <th>总盈利率</th>
                            <th>选股成功率</th>
                            <th>周均收益率</th>
                            <th>平均持股天数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <template v-if="month_rate.length > 0">
                        <tr v-for="item in month_rate">
                            <td><span :class="'tr-rank'+ item.ranking_icon">{{ item.ranking }}</span></td>
                            <td class="am-text-left">
                                <div class="tr-username">
                                    <a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a>
                                </div>
                            </td>
                            <td><span :class="item.days_rate_class">{{ item.days_rate }}</span></td>
                            <td><span :class="item.week_rate_class">{{ item.week_rate }}</span></td>
                            <td><span :class="'tr-color-order '+item.month_rate_class">{{ item.month_rate }}</span></td>
                            <td><span :class="item.total_rate_class">{{ item.total_rate }}</span></td>
                            <td><span>{{ item.success_rate }}</span></td>
                            <td><span :class="item.week_avg_profit_rate_class">{{ item.week_avg_profit_rate }}</span></td>
                            <td><span>{{ item.avg_position_day }}</span></td>
                        </tr>
                        </template>
                        <template v-else>
                        <tr><td colspan="9"><span>暂无数据</span></td></tr>
                        </template>
                    </tbody>
                </table>
            </div>
            <div class="am-tab-panel">
                <table class="am-table am-table-centered">
                    <thead>
                        <tr>
                            <th>排名</th>
                            <th width="18%">用户名</th>
                            <th>日盈利率</th>
                            <th>周盈利率</th>
                            <th>月盈利率</th>
                            <th><span class="tr-color-order">总盈利率</span></th>
                            <th>选股成功率</th>
                            <th>周均收益率</th>
                            <th>平均持股天数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <template v-if="total_rate_10.length > 0">
                            <tr v-for="item in total_rate_10">
                                <td><span :class="'tr-rank'+item.rownum_class">{{ item.rownum }}</span></td>
                                <td class="am-text-left">
                                    <div class="tr-username">
                                        <a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a>
                                    </div>
                                </td>
                                <td><span :class="item.days_rate_class">{{ item.days_rate }}</span></td>
                                <td><span :class="item.week_rate_class">{{ item.week_rate }}</span></td>
                                <td><span :class="item.month_rate_class">{{ item.month_rate }}</span></td>
                                <td><span :class="'tr-color-order '+item.total_rate_class">{{ item.total_rate }}</span></td>
                                <td><span class="">{{ item.success_rate }}</span></td>
                                <td><span :class="item.week_avg_profit_rate_class">{{ item.week_avg_profit_rate }}</span></td>
                                <td><span>{{ item.avg_position_day }}</span></td>
                            </tr>
                        </template>
                        <template v-else>
                            <tr>
                                <td colspan="7"><span>暂无数据</span></td>
                            </tr>
                        </template>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    
    <div class="am-g">
        <div class="am-u-md-6 am-padding-right-sm tr-ranking">
            <section class="am-panel am-panel-default">
                <div class="am-panel-hd am-container">
                    <h2 class="am-panel-title am-fl">
                        总收益榜
                    </h2>
                    <nav class="am-panel-nav am-fr am-padding-right-sm">
                        <a href="{:url('index/index/rankingList', ['order'=>'total_rate'])}" class="">更多 &raquo;</a>
                    </nav>
                </div>
                <div class="tr-ranking-table">
                    <table class="am-table am-table-centered am-margin-0">
                        <thead>
                            <tr>
                                <th class="tr-ranking-username">用户名</th>
                                <th>总收益率</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="item in total_rate_5">
                                <td class="am-text-left"><a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a></td>
                                <td><span :class="item.total_rate_class">{{ item.total_rate }}</span></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </section>
        </div>
        <div class="am-u-md-6 am-padding-left-sm tr-ranking">
            <section class="am-panel am-panel-default">
                <div class="am-panel-hd am-container">
                    <h2 class="am-panel-title am-fl">
                        选股牛人
                    </h2>
                    <nav class="am-panel-nav am-fr am-padding-right-sm">
                        <a href="{:url('index/index/rankingList', ['order'=>'success_rate'])}" class="">更多 &raquo;</a>
                    </nav>
                </div>
                <div class="tr-ranking-table">
                    <table class="am-table am-table-centered am-margin-0">
                        <thead>
                            <tr>
                                <th class="tr-ranking-username">用户名</th>
                                <th>选股成功率</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="item in success_rate">
                                <td class="am-text-left"><a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a></td>
                                <td><span :class="item.success_rate_class">{{ item.success_rate }}</span></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </section>
        </div>
    </div>
    <p class="tr-img-ad">
        <a :href="index_banner.url" :title="index_banner.title" target="_blank"><img :src="index_banner.image" :alt="index_banner.title" class="am-img-responsive" /></a>
    </p>
    <div class="am-g">
        <div class="am-u-md-6 am-padding-right-sm tr-ranking">
            <section class="am-panel am-panel-default">
                <div class="am-panel-hd am-container">
                    <h2 class="am-panel-title am-fl">
                        常胜牛人
                    </h2>
                    <nav class="am-panel-nav am-fr am-padding-right-sm">
                        <a href="{:url('index/index/rankingList', ['order'=>'week_avg_profit_rate'])}" class="">更多 &raquo;</a>
                    </nav>
                </div>
                <div class="tr-ranking-table">
                    <table class="am-table am-table-centered am-margin-0">
                        <thead>
                            <tr>
                                <th class="tr-ranking-username">用户名</th>
                                <th>周均收益率</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="item in week_avg_profit_rate">
                                <td class="am-text-left"><a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a></td>
                                <td><span :class="item.week_avg_profit_rate_class">{{ item.week_avg_profit_rate }}</span></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </section>
        </div>
        <div class="am-u-md-6 am-padding-left-sm tr-ranking">
            <section class="am-panel am-panel-default">
                <div class="am-panel-hd am-container">
                    <h2 class="am-panel-title am-fl">
                        人气牛人
                    </h2>
                    <nav class="am-panel-nav am-fr am-padding-right-sm">
                        <a href="{:url('index/index/rankingList', ['order'=>'fans'])}" class="">更多 &raquo;</a>
                    </nav>
                </div>
                <div class="tr-ranking-table">
                    <table class="am-table am-table-centered am-margin-0">
                        <thead>
                            <tr>
                                <th class="tr-ranking-username">用户名</th>
                                <th>粉丝数</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="item in fans">
                                <td class="am-text-left"><a :href="'{:url("index/index/personal")}?uid=' + item.uid" :title="item.user_name"><img :src="item.portrait" onerror="javascript:this.src=img_url+'/static/img/portrait.gif'" class="am-circle tr-ranking-portrait" alt="">{{ item.user_name }}</a></td>
                                <td><span>{{ item.fans }}</span></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </section>
        </div>
    </div>
    <div class="am-panel am-panel-default tr-match">
        <div class="am-panel-hd">
            <h2 class="am-panel-title">
                模拟赛场
            </h2>
        </div>
        <div class="am-panel-bd am-container">
            <div v-for="item in week_matchs" class="am-u-md-12 am-padding-vertical-sm tr-match-item" >
                <div class="am-u-lg-10 tr-list-main">
                    <div class="am-u-md-3 am-padding-horizontal-sm">
                        <a :href="'{:url('index/macthUser')}?id=' + item.id"><img :src="item.image" :alt="item.name" width="100%" /></a>
                    </div>
                    <div class="am-u-md-7 am-padding-left am-margin-top">
                        <div>
                            <a :href="'{:url('index/macthUser')}?id=' + item.id" :title="item.name" class="am-margin-right tr-simulation-name">{{ item.name }}</a>
                        </div>
                        <p>比赛时间：{{ item.start_date }} 到 {{ item.end_date }}
                        </p>
                        <div class="am-u-md-12">
                            <template v-if="item.joined == 1">
                            <label>我在比赛中的排名：</label><span>{{ item.ranking }}名</span>
                            </template>
                        </div>
                    </div>
                    <div class="am-u-md-2 am-padding-left tr-status-div">
                        <span :class="'tr-status'+item.status_class">{{ item.status_name }}</span>
                    </div>
                </div>    
                <div class="am-u-lg-2 am-list-main am-text-center tr-list-button">
                    <template v-if="(item.status == 1 || item.status == 2) && item.joined == 0">
                        <template v-if="logined">
                                <a href="javascript:;" :href-url="'{:url('index/macthUser')}?id='+item.id" class="am-btn am-btn-danger am-btn-lg" :id="item.id" v-on:click="join_match">参加比赛</a>
                        </template>
                        <template v-else>
                                <a href="{:url('index/login')}" class="am-btn am-btn-danger am-btn-lg" target="_blank">参加比赛</a>
                        </template>
                    </template>
                    <template v-else>
                        <a :href="'{:url('index/macthUser')}?id='+item.id" class="am-btn am-btn-primary am-btn-lg">查看比赛</a>
                    </template>  
                </div>
            </div>
            <div class="am-u-md-12 am-padding-vertical-sm tr-match-item" v-for="item in month_matchs">
                <div class="am-u-lg-10 tr-list-main">
                    <div class="am-u-md-3 am-padding-horizontal-sm">
                        <a :href="'{:url('index/macthUser')}?id=' + item.id"><img :src="item.image" :alt="item.name" class="am-img-responsive" /></a>
                    </div>
                    <div class="am-u-md-7 am-padding-left am-margin-top">
                        <div>
                            <a :href="'{:url('index/macthUser')}?id=' + item.id" :title="item.name" class="am-margin-right tr-simulation-name">{{ item.name }}</a>
                        </div>
                        <p>比赛时间：{{ item.start_date }} 到 {{ item.end_date }}
                        </p>
                        <div class="am-u-md-12">
                            <template v-if="item.joined == 1">
                            <label>我在比赛中的排名：</label><span>{{ item.ranking }}名</span>
                            </template>
                        </div>
                    </div>
                    <div class="am-u-md-2 am-padding-left tr-status-div">
                        <span :class="'tr-status'+item.status_class">{{ item.status_name }}</span>
                    </div>
                </div>    
                <div class="am-u-lg-2 am-list-main am-text-center tr-list-button">
                    <template v-if="(item.status == 1 || item.status == 2) && item.joined == 0">
                        <template v-if="logined">
                                <a href="javascript:;" :href-url="'{:url('index/macthUser')}?id='+item.id" class="am-btn am-btn-danger am-btn-lg" :id="item.id" v-on:click="join_match">参加比赛</a>
                        </template>
                        <template v-else>
                                <a href="{:url('index/login')}" class="am-btn am-btn-danger am-btn-lg" target="_blank">参加比赛</a>
                        </template>
                    </template>
                    <template v-else>
                        <a :href="'{:url('index/macthUser')}?id='+item.id" class="am-btn am-btn-primary am-btn-lg">查看比赛</a>
                    </template>
                </div>   
            </div>
        </div>
    </div>
</div>
{/block} 
{block name="footer"}
    {include file="public/footer" /}
    {include file="public/modal" /}
{/block} 
{block name="js"} 
    {js href="/static/js/widget/carouFredSel.js"}
    {js href="/static/js/public/modal.js"}
    {js href="/static/js/index/index.js"} 
{/block}
